<template>
<div style="background:#ffffff" class="rounded-lg ">
  <div class="flex ml-2">
    <div class="flex flex-col">
      <span class="text-gray-400">邀请用户</span>
      <span class="text-blue-500 text-lg font-bold">{{pagination.count}}</span>
    </div> 
    
  </div>
  <div class="flex justify-between  p-2" style="background-color:#f2f2f2">
    <span style="width:100px;" class="flex justify-start">序号</span>
    <span class="flex flex-1 justify-center">注册时间</span>
    <span class="flex flex-1 justify-center">被邀请人手机号</span>
  </div>
  <a-list item-layout="horizontal" :data-source="listData">
    
    <template #renderItem="{ item ,index}">
      <a-list-item key="item.title">
         <div class="flex w-full justify-between ml-2  p-2">
            <span style="width:100px;" class="flex justify-start">{{index+1}}</span>
            <span class="flex flex-1 justify-center">{{ item.createDate }}</span>
            <span class="flex flex-1 justify-center">{{ item.byqr }}</span>
           
          </div>
          
      </a-list-item>
      </template>
  </a-list>
  
  
  </div>
</template>
<script lang="ts">
import { CaretRightOutlined } from '@ant-design/icons-vue';
import { ref,defineComponent } from 'vue';
import { qyjlistapi } from '/@/api/dp/dpbaseapi';
import { List,ListItem } from 'ant-design-vue';




export default defineComponent({
  components: {
   CaretRightOutlined,
   AList:List,
   AListItem:ListItem
  },
})
</script>

<script lang="ts" setup>  
    const props = defineProps({
  
    qyjtype:String

});
    const listData=ref([]);
    const pagination = ref({
      pageNo:1,
      pageSize:20,
      count:0,
    });
    const visibleD = ref<boolean>(false);
    const newsobj=ref({});

    
    getlist();
    async function getlist(){
      console.log(pagination);
      const res=  await qyjlistapi({qyjtype:0});
      console.log(res.list);
      pagination.value.pageNo=res.pageNo;
      pagination.value.pageSize=res.pageSize;
      pagination.value.count=res.count;
      listData.value=res.list;
      console.log(listData);
    }

    
</script>

<style scoped>
.text-ellipsis {
  height: 2.6em; /* 设置高度为固定的行高的两倍 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* 限制在两行 */
  overflow: hidden;
  text-overflow: ellipsis; /* 添加省略号 */
}
</style>